<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet
	version="1.0"
	xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
	xmlns:my="http://net.bioteam.appweb/cmdxml" 
	
	xmlns="http://net.bioteam.appweb/cmdxml"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://net.bioteam.appweb/cmdxml pise.xsd "
	>


	<xsl:output
		method="xml"
		indent="yes" />
	
	<!-- prompt parameter to parametrs parent-->	
	<xsl:template match="my:parameters">
		<xsl:apply-templates select="my:parameter"/>
	</xsl:template>
	
	<!--  prompt head child to pise -->
	<xsl:template match="my:head">
		<xsl:apply-templates select="*"/>
	</xsl:template>
	
	<!-- if there is a paragraph element, prompt paragraph to replace parameter -->
	<xsl:template match="my:parameter[@type='Paragraph']">
		<xsl:apply-templates select="my:paragraph"/>
	</xsl:template>
	<!--  add type attribute to paragraph -->
	<xsl:template match="my:paragraph">
		<xsl:text disable-output-escaping="yes">&lt;parameter type="Paragraph" xmlns:tns="http://net.bioteam.appweb/cmdxml" xsi:type="tns:paragraph"&gt;</xsl:text>
		<xsl:apply-templates select="*"/>
		<xsl:text disable-output-escaping="yes">&lt;/parameter&gt;</xsl:text>
	</xsl:template>
	
	<!--  prompt attributes's child to attributes parent. -->
	<xsl:template match="my:attributes">
		<xsl:apply-templates select="*"/>
	</xsl:template>
	
	<!--  prompt attributes's child to attributes parent. -->
	<xsl:template match="my:ctrls">
		<xsl:apply-templates select="*"/>
	</xsl:template>
	
	<xsl:template match="node() |@*">
		<xsl:copy>
			<xsl:apply-templates select="node()|@*"/>
		</xsl:copy>
	
	</xsl:template>




</xsl:stylesheet>
